// ******************************************************************
// * Copyright(c)  Steven Lu
// * Description   : Entity_hm_whitelist
// * CreateDate    : 2014-06-05 18:30:02
// * Creater       : CodeSmith
// * LastChangeDate: 2014-06-05 18:30:02
// * LastChanger   : 2014-06-05 18:30:02
// * Version Info  : 1.0 For ESOL
// ******************************************************************

using System;
using System.Data;
using System.Collections.Generic;
using System.Text;
using System.Runtime.Serialization;
using Suzsoft.Smart.EntityCore;
using ESOL.Common.Schema;
using ESOL.Common;

namespace ESOL.Common.Entity
{
    [DataContract]
	[Serializable]
	public partial class HmWhitelistEntity : EntityBase
    {
        public HmWhitelistTable TableSchema
        {
            get
            {
                return HmWhitelistTable.Current;
            }
		}
		
		public HmWhitelistEntity()
        {

        }
		
		public HmWhitelistEntity(DataRow dr)
        {
			if(dr == null)
			{
				return;
			}
			this.Whiteid = Convert.ToInt64(CommonFunctions.ToObject(dr["whiteid"]));
			this.Whiteloweripaddress1 = Convert.ToInt64(CommonFunctions.ToObject(dr["whiteloweripaddress1"]));
			this.Whiteloweripaddress2 = Convert.ToInt64(CommonFunctions.ToObject(dr["whiteloweripaddress2"]));
			this.Whiteupperipaddress1 = Convert.ToInt64(CommonFunctions.ToObject(dr["whiteupperipaddress1"]));
			this.Whiteupperipaddress2 = Convert.ToInt64(CommonFunctions.ToObject(dr["whiteupperipaddress2"]));
			this.Whiteemailaddress = Convert.ToString(CommonFunctions.ToObject(dr["whiteemailaddress"]));
			this.Whitedescription = Convert.ToString(CommonFunctions.ToObject(dr["whitedescription"]));
        }
		
		public HmWhitelistEntity(DataRowView dr)
        {
			if(dr == null)
			{
				return;
			}
			this.Whiteid = Convert.ToInt64(CommonFunctions.ToObject(dr["whiteid"]));
			this.Whiteloweripaddress1 = Convert.ToInt64(CommonFunctions.ToObject(dr["whiteloweripaddress1"]));
			this.Whiteloweripaddress2 = Convert.ToInt64(CommonFunctions.ToObject(dr["whiteloweripaddress2"]));
			this.Whiteupperipaddress1 = Convert.ToInt64(CommonFunctions.ToObject(dr["whiteupperipaddress1"]));
			this.Whiteupperipaddress2 = Convert.ToInt64(CommonFunctions.ToObject(dr["whiteupperipaddress2"]));
			this.Whiteemailaddress = Convert.ToString(CommonFunctions.ToObject(dr["whiteemailaddress"]));
			this.Whitedescription = Convert.ToString(CommonFunctions.ToObject(dr["whitedescription"]));
        }

        public override TableInfo OringTableSchema
        {
            get
            {
                return HmWhitelistTable.Current;
            }
        }
		
		#region Perporty List
        [DataMember]
        public long Whiteid
        {
            get { return Convert.ToInt64(GetData(HmWhitelistTable.C_whiteid)); }
            set { SetData(HmWhitelistTable.C_whiteid, value); }
        }
		
        [DataMember]
        public long Whiteloweripaddress1
        {
            get { return Convert.ToInt64(GetData(HmWhitelistTable.C_whiteloweripaddress1)); }
            set { SetData(HmWhitelistTable.C_whiteloweripaddress1, value); }
        }
		
        [DataMember]
        public long Whiteloweripaddress2
        {
            get { return Convert.ToInt64(GetData(HmWhitelistTable.C_whiteloweripaddress2)); }
            set { SetData(HmWhitelistTable.C_whiteloweripaddress2, value); }
        }
		
        [DataMember]
        public long Whiteupperipaddress1
        {
            get { return Convert.ToInt64(GetData(HmWhitelistTable.C_whiteupperipaddress1)); }
            set { SetData(HmWhitelistTable.C_whiteupperipaddress1, value); }
        }
		
        [DataMember]
        public long Whiteupperipaddress2
        {
            get { return Convert.ToInt64(GetData(HmWhitelistTable.C_whiteupperipaddress2)); }
            set { SetData(HmWhitelistTable.C_whiteupperipaddress2, value); }
        }
		
        [DataMember]
        public string Whiteemailaddress
        {
            get { return Convert.ToString(GetData(HmWhitelistTable.C_whiteemailaddress)); }
            set { SetData(HmWhitelistTable.C_whiteemailaddress, value); }
        }
		
        [DataMember]
        public string Whitedescription
        {
            get { return Convert.ToString(GetData(HmWhitelistTable.C_whitedescription)); }
            set { SetData(HmWhitelistTable.C_whitedescription, value); }
        }
		
		#endregion
	}
	
	
}	

